
<!DOCTYPE html>
<html>
<!--Made By kailuosoft.com, TEL 171 9992 9517 -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>凯络科技后台管理系统 - 宝贝绑定</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
	<style>
		/* 选中框 样式 */
    	 .row .radio{display:inline-block;margin-right:20px;font-weight:normal;}
		 .row .radio input[type=radio]{margin-top:2px;}
    </style>
    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/css/new.css" rel="stylesheet">
	
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                           <h5>宝贝绑定</h5>
                    </div>
                    <div class="ibox-content">
                        <form class="form-horizontal m-t" id="commentForm" action="{:U('goods/bind')}" method="post">
                           <table class="table table-bordered table-striped table-hover">
                               <tr>
                                  <td>宝贝名称</td>
                                  <td>{$info.title}</td>
                               </tr>
                               <tr>
                                  <td>SKU</td>
                                  <td>{$info.properties_name}</td>
                               </tr>
                               <tr>
                                  <td>流量包类型</td>
                                  <td>
                                     <foreach name='proinfo' item='product'>
                                     	<label class="radio">
                                        	<input type='radio' name='product' id='product' <?php echo ($info['bind_product']==$product['flow'])?'checked':'' ?> value="<?php echo $product['flow'] ?>">{$product.gprs_num}M &nbsp
                                    	</label>
                                     </foreach>
                                  </td>
                               </tr>
                               <tr>
                                  <td>赠送条件</td>
                                  <td> 
                                    <label class="radio">
                                        <input type='radio' name='condition' id='condition' value='认真评价赠送' <?php echo ($info['condition']=='认真评价赠送')?'checked':'' ?>>认真评价赠送 &nbsp;
                                    </label>
                                    <label class="radio">
                                        <input type='radio' name='condition' id='condition' value='付款赠送' <?php  echo  ($info['condition']=='付款赠送')?'checked':'' ?>>付款赠送 &nbsp;
                                    </label>
                                    <label class="radio">
                                        <input type='radio' name='condition' id='condition' value='认真评价带图赠送'  <?php echo  ($info['condition']=='认真评价带图赠送')?'checked':'' ?>>认真评价带图赠送 &nbsp;
                                    </label>
                                    <label class="radio">
                                        <input type='radio' name='condition' id='condition' value='20字认真评价'  <?php echo  ($info['condition']=='20字认真评价')?'checked':'' ?>>20字认真评价 &nbsp;
                                    </label>
                                    <label class="radio">
                                        <input type='radio' name='condition' id='condition' value='金额满送'  <?php echo  ($info['condition']=='金额满送')?'checked':'' ?>>金额满送 &nbsp;
                                    </label>
                                  </td>
                               </tr>
                               <tr>
                                  <input type='hidden' name='sku_id' id='sku_id' value="<?php echo $info['sku_id'] ?>">
                                  <input type='hidden' name='num_iid' id='num_iid' value="<?php echo $info['num_iid'] ?>">
                                  <td colspan='2'>
                                      <span id="submit" class="btn btn-primary"> 确认绑定</span>
                                      <if condition=" !empty($info)"> 
                                        <a class="btn btn-primary" href='javascript:history.back(-1)'>返回</a>
                                      </if>
                                  </td>
                               </tr>
                           </table>
							
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="__PUBLIC__/js/jquery.min63b9.js?v=2.1.4"></script>
    <script src="__PUBLIC__/js/bootstrap.min14ed.js?v=3.3.6"></script>
    <script src="__PUBLIC__/js/content.mine209.js?v=1.0.0"></script>
    <script src="__PUBLIC__/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="__PUBLIC__/js/plugins/validate/messages_zh.min.js"></script>
    <script src="__PUBLIC__/js/demo/form-validate-demo.min.js"></script>
    <script src="__PUBLIC__/js/plugins/layer/layer.min.js"></script>
   

<script>
    $('#submit').click(function(event){

		 var sku_id=$('#sku_id').val();
		 var num_iid=$('#num_iid').val();
		 var condition=$("input[name=condition]:checked").val();
		 var product=$("input[name=product]:checked").val();
         
		 if(condition=='' || condition==null || product=='' || product==null)
		 {   
			 return false;
		 }
		 
		 $.ajax({
			 url: '/index.php/home/goods/bind',
			 type:'POST',
			 data:'sku_id='+sku_id+'&num_iid='+num_iid+'&condition='+condition+'&product='+product,
			 success:function(data){
				if(data==0){
					layer.alert('绑定失败','',function(){self.location=document.referrer;});
				}else if(data==1){
					layer.alert('绑定成功','',function(){self.location=document.referrer;});
				}
			}
		 })
	})
</script>

</body>
<!--Made By kailuosoft.com, TEL 171 9992 9517 -->
<script  type="text/javascript"  src="http://g.tbcdn.cn/sj/securesdk/0.0.3/securesdk_v2.js"  id="J_secure_sdk_v2" data-appkey="23416550"></script>
</html>
